package cn.itsource.pojo.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DepartmentDto {
    private Long id;
    // 部门名
    private String name;
    // 部门上级的分类层次id
    private Long dirPath;
    // 部门状态
    private Integer state;
    // 部门管理员
    private String realName;
    //上级部门id
    private Long parentId;
    // 上级部门
    private String parentName;
    //部门所属机构
    private Long tenantId;
    // 员工数量
    private Integer number;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<DepartmentDto> children = new ArrayList<>();

}
